library(bigMap)

Load data

D <- as.matrix(read.csv('../sierpinski3d.mtx', sep = '', header = F))

Run Fit-SNE

source('~/FitSNE/fast_tsne.R', chdir = T)
# perplexities
ppx.list <- round(nrow(d) *c(.01, .05, .1, .2, .3, .4, .5, .6, .7, .8, .9, .95, .99), 0)
#
g.list <- lapply(ppx.list, function(ppx) {
  t <- system.time(Y <- fftRtsne(D, perplexity = ppx))
  # structure results as a bigMap instance
  g <- list(dSet = 'S3D', is.distance = T, is.sparse = F, normalize = T, ppx = list(ppx = ppx), ptsne = list(Y = Y), t = t)
  g
})
save(g.list, file = './glist.RData')

Output

# source graph plot
source('../graphs.R')
# load edge matrix
E <- as.matrix(read.csv('../sierpinski3d.edg', sep = '', header = F))
# plot
nulL <- lapply(g.list, function(g) graph.plot(g, E))

hl-Correlation

g.list <- lapply(g.list, function(g) bdm.hlCorr(D, g, zSampleSize = 1000, threads = 4))
save(g.list, file = './glist.RData')
hlTable <- t(sapply(g.list, function(g) summary(g$hlC)))
rownames(hlTable) <- sapply(g.list, function(g) g$ppx$ppx)
knitr::kable(hlTable, caption = 'hl-Correlation') %>%
  kable_styling(full_width = F)
hl-Correlation
Min. 1st Qu. Median Mean 3rd Qu. Max.
20 0.7179428 0.7182805 0.7208655 0.7214181 0.7240032 0.7259986
102 0.7106945 0.7140616 0.7156406 0.7157177 0.7172967 0.7208951
205 0.7017698 0.7095794 0.7122052 0.7096881 0.7123139 0.7125721
410 0.7096761 0.7112273 0.7121224 0.7120450 0.7129400 0.7142590
615 0.7140657 0.7207116 0.7237417 0.7221726 0.7252026 0.7271412
820 0.7105227 0.7146443 0.7177535 0.7172260 0.7203352 0.7228743
1025 0.6935006 0.6938621 0.6951340 0.6975119 0.6987837 0.7062790
1230 0.6983627 0.7012835 0.7027970 0.7041715 0.7056850 0.7127295
1435 0.7191932 0.7231124 0.7253989 0.7253479 0.7276344 0.7314005
1640 0.7162144 0.7262832 0.7322210 0.7308447 0.7367826 0.7427224
1845 0.7227303 0.7270142 0.7301627 0.7291827 0.7323312 0.7336753
1948 0.7141561 0.7152969 0.7224312 0.7231476 0.7302819 0.7335717
2030 0.7217078 0.7224747 0.7292954 0.7292898 0.7361105 0.7368606

Kary-neighborhood preservation

g.list <- lapply(g.list, function(g) bdm.knp(D, g, k.max = NULL, sampling = 0.9, threads = 4))
save(g.list, file = './glist.RData')
bdm.knp.plot(g.list, ppxfrmt = 0)

Running Times

rTimes <- round(sapply(g.list, function(m) m$t$fitSNE[[3]]), 0)
rTimes <- matrix(rTimes, nrow = 1)
colnames(rTimes) <- sapply(g.list, function(m) m$ppx$ppx)
rownames(rTimes) <- c('FitSNE')
knitr::kable(rTimes, caption = 'Computation times (s)') %>%
  kable_styling(full_width = F)
Computation times (s)
20 102 205 410 615 820 1025 1230 1435 1640 1845 1948 2030
FitSNE 25 17 20 26 33 36 36 36 36 35 36 36 35

Run on: Intel(R) Xeon(R) CPU E31225 @ 3.10GHz, 4 cores, 16GB RAM.